<!doctype html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title>后台登录-X-admin2.2</title>
        <meta name="renderer" content="webkit|ie-comp|ie-stand">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <meta http-equiv="Cache-Control" content="no-siteapp" />

        <link rel="stylesheet" href="__X-ADMIN__/css/font.css">
        <link rel="stylesheet" href="__X-ADMIN__/css/xadmin.css">
    </head>
    <body>
    <div class="layui-container">
        <div class="fly-panel">
            <div class="fly-none">
                <?php switch ($code) {?>
                <?php case 1:?>
                <h2><i class="layui-icon layui-icon-face-smile"></i></h2>
                <?php break;?>
                <?php case 0:?>
                <h2><i class="layui-icon layui-icon-close"></i></h2>
                <?php break;?>
                <?php } ?>
                <p>{$msg}</p>
                <p><b id="wait">{$wait}</b> 秒后页面将自动跳转<a id="href" id="btn-now" href="{$url}">立即跳转</a></p>
            </div>
        </div>
    </div>
    <style>
        #href{
            color: #1e9fff;
        }
    </style>
    <script>
        (function(){
            var wait = document.getElementById('wait'),
                href = document.getElementById('href').href;
            var interval = setInterval(function(){
                var time = --wait.innerHTML;
                if(time <= 0) {
                    location.href = href;
                    clearInterval(interval);
                };
            }, 1000);
            window.stop = function (){
                console.log(111);
                clearInterval(interval);
            }
        })();
    </script>
    </body>
</html>